#ifndef __BIT_DEF__
#define __BIT_DEF__

#define set_bit(x,y)	(x|=(1<<y))
#define clr_bit(x,y)	(x&=~(1<<y))
#define get_bit(x,y)	(x&(1<<y))
#define inv_bit(x,y)    (x^=(1<<y))
#define set_port(x,y,z)   (y=(y|(x&z))&(y|~z)) //y is the PORTx which is ready to set,x is DDRx,z is the state to set;
#define inv_port(x,y)     (x=(x^y)&y)

#endif
